
import 'package:basic_common/common_exports.dart';

class MyDialog extends Dialog{
  String title;
  String content;

  MyDialog(this.title,this.content);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Material(
      type: MaterialType.transparency,
      child: Center(
        child: Container(
          width: ScreenHelper.screenWidth,
          height: ScreenHelper.height(200),
          color: Colors.white,
          child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Padding(
              padding: EdgeInsets.all(10),
              child: Stack(
                    children: [
                      Align(
                        child: Text('${this.title}'),
                        alignment: Alignment.center,
                      ),
                      Align(
                        alignment: Alignment.centerRight,
                        child: InkWell(
                          child: Icon(Icons.close),
                          onTap: () {
                            Navigator.pop(context);
                          },
                        ),
                      ),
                    ],
                  )
            ),
            Divider(),
            Container(
              padding: EdgeInsets.all(10),
              width: double.infinity,
              child: Text('${this.content}',textAlign: TextAlign.left,),
            )
          ],
        ),
      ),
    ),

    );
  }
}
